package com.atguigu.string;
public class StringTest1 {
        String str=new String("good");
        char[] ch={'t','e','s','t'};

        public static void main(String[] args) {
            StringTest1 ex=new StringTest1();
            ex.change(ex.str,ex.ch);
            System.out.println(ex.str+"and"); //结果为goodand
            System.out.println(ex.ch);//best
        }

        public void change(String str,char ch[]){
            str="test ok";
            ch[0]='b';
        }
}
